Ext.onReady(function(){
		var d = new Date();

		var str = d.getFullYear()+"-"+(d.getMonth()+1)+"-"+d.getDate();
		var processHistoryPanel=Ext.create('component.proces.history',{
			 processInstanceId: procInstId,
			 minHeight:100,
			 contextPath:contextPath
		});
		processHistoryPanel.setAutidStatusName(auditStatus);
		processHistoryPanel.setProcesHistoryVisible(processFlag);
		
		var fileAttachment = Ext.create('component.file.attachment',{
	        objectId: businessAbnormaId,
	        imageType: "6",
	        contextPath:contextPath,
	        colspan:2
	    });
	   var fromPanelInfo = Ext.create('Ext.form.FormPanel',{
		   renderTo:Ext.getBody(),
		   frame: true,
	       collapsible: false,
	       autoScroll:false,
	       defaultType : 'textfield',
			defaults : {
				anchor : '95%',
			},
			fieldDefaults : {
				flex : 1
			},
	       title:'退认筹审批审批单',
		   items:[{
				xtype : "container",
				layout : "hbox",
				items : [ {
					   xtype:'displayfield',
			    	   fieldLabel:'认筹编号',
			    	   name:'depositCode'
			    	   
				}, {
					 xtype:'displayfield',
			    	 fieldLabel:'认筹日期',
			    	 name:'didTime',
		                renderer:function(val){
		                	if(val==null||val==""){
		                		return "";
		                	}
		                	return Ext.Date.format(new Date(val),'Y-m-d');
		                }
				}]
			},{
				xtype : "container",
				layout : "hbox",
				items : [ {
					 xtype:'displayfield',
			    	 fieldLabel:'房号',
			    	 name:'roomName'
				},{
					 xtype:'displayfield',
			    	 fieldLabel:'客户姓名',
			    	 name:'customerName'
				} ]
			},{
				xtype : "container",
				layout : "hbox",
				items : [ {
					 xtype:'displayfield',
			    	 fieldLabel:'计价面积(㎡)',
			    	 name:'calculateArea'
				},{
					 xtype:'displayfield',
			    	 fieldLabel:'房屋总价(元)',
			    	 name:'discountTotalPrice'
				} ]
			},{
				xtype : "container",
				layout : "hbox",
				items : [ {
					 xtype:'displayfield',
			    	 fieldLabel:'认筹金(元)',
			    	 name:'payDepositAmount'
				},{
					 xtype:'displayfield',
			    	 fieldLabel:'认筹明细',
			    	 name:'showName',
			    	 value:''
				} ]
			},{
				xtype : "container",
				layout : "hbox",
				items : [  {
					xtype : 'displayfield',
					fieldLabel : '退筹原因',
					width:500,
					name:'remark',
					id:'reason',
					allowBlank:false,
			    	blankText:'不能为空'
				} ]
			},{
				xtype : "container",
				layout : "hbox",
				items : [ {
					 xtype:'displayfield',
			    	 fieldLabel:'经纪人',
			    	 name:'agentName'
				},
				 {
					 xtype:'displayfield',
			    	 fieldLabel:'申请日期',
			    	 name:'tcCreateTime'
				}]
			},fileAttachment,processHistoryPanel]
		   
	   });
	   
	   fromPanelInfo.getForm().load({
			url:contextPath+'/customer/payDeposit/loadRetreat',
			params:{'payDepositId':payDepositId},
			success:function(form, action){
				var obj = action.result.data;
				console.log(obj);
				 var result=Ext.JSON.decode(obj);
				 console.log(result);
				fromPanelInfo.getForm().setValues(result);
				var jumpUrl=contextPath+'/customer/payDeposit/toView?id='+result.id+"&processFlag=processHistoryShow&returnUrl=,customer,payDeposit,toRetreatView(id)"+tId;
				var showValue='<a href="'+jumpUrl+'" target="_blank">点击查看认筹明细</a>';
				fromPanelInfo.getForm().findField("showName").setValue(showValue);
			},   
			failure: function(form, action) {
		        Ext.Msg.alert("加载失败", action.result.errorMessage);
		    }

		});
});